package com.ruoyi.project.service.impl;

import java.util.List;

import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mapper.HeEventBasicMapper;
import com.ruoyi.project.domain.HeEventBasic;
import com.ruoyi.project.service.IHeEventBasicService;

/**
 * 事件基本信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-09-03
 */
@Service
public class  HeEventBasicServiceImpl implements IHeEventBasicService
{
    @Autowired
    private HeEventBasicMapper heEventBasicMapper;

    /**
     * 查询事件基本信息
     * 
     * @param id 事件基本信息主键
     * @return 事件基本信息
     */
    @Override
    public HeEventBasic selectHeEventBasicById(Long id)
    {
        return heEventBasicMapper.selectHeEventBasicById(id);
    }

    /**
     * 查询事件基本信息列表
     * 
     * @param heEventBasic 事件基本信息
     * @return 事件基本信息
     */
    @Override
    public List<HeEventBasic> selectHeEventBasicList(HeEventBasic heEventBasic)
    {
        return heEventBasicMapper.selectHeEventBasicList(heEventBasic);
    }

    /**
     * 新增事件基本信息
     * 
     * @param heEventBasic 事件基本信息
     * @return 结果
     */
    @Override
    public int insertHeEventBasic(HeEventBasic heEventBasic)
    {
        return heEventBasicMapper.insertHeEventBasic(heEventBasic);
    }

    /**
     * 修改事件基本信息
     * 
     * @param heEventBasic 事件基本信息
     * @return 结果
     */
    @Override
    public int updateHeEventBasic(HeEventBasic heEventBasic)
    {
        heEventBasic.setUpdateTime(DateUtils.getNowDate());
        return heEventBasicMapper.updateHeEventBasic(heEventBasic);
    }

    /**
     * 批量删除事件基本信息
     * 
     * @param ids 需要删除的事件基本信息主键
     * @return 结果
     */
    @Override
    public int deleteHeEventBasicByIds(Long[] ids)
    {
        return heEventBasicMapper.deleteHeEventBasicByIds(ids);
    }

    /**
     * 删除事件基本信息信息
     * 
     * @param id 事件基本信息主键
     * @return 结果
     */
    @Override
    public int deleteHeEventBasicById(Long id)
    {
        return heEventBasicMapper.deleteHeEventBasicById(id);
    }
}
